#pragma once

#include "Test.h"
#include "phy/ParticleEngine2D.h"

class OneParticleTest : public Test
{
public:
	OneParticleTest(TestManager* testManager);
	virtual ~OneParticleTest();

	virtual void Init();
	virtual void Update(float i_elapsedTime);
	virtual void Render(Renderer& renderer) const;
	virtual	void OnKeyPressed(int keyCode);
	
	void Shoot();

private:
	phynet::phy::ParticleEngine2D m_engine;

	phynet::phy::ParticleGravityFG2D m_gravityFG;
	phynet::phy::ParticleWindFG2D m_windFG;
	phynet::phy::Particle2D m_particle;

	phynet::Real m_nextParticleSpeed;
	phynet::Real m_nextParticleAngleGrad;
	phynet::Real m_nextParticleMass;
	phynet::Real m_nextParticleDamping;

	static const phynet::Real PARTICLE_STARTING_SPEED;
	static const phynet::Real PARTICLE_STARTING_ANGLE_GRAD;
	static const phynet::Real PARTICLE_STARTING_MASS;
	static const phynet::Real PARTICLE_STARTING_DAMPING;

}; // class OneParticleTest
